package P4.T06;

public class Date {
    private int year, month, day;
    public Date(int year, int month, int day) throws Exception {
        if(year>9999||year<1000)throw new YearOutofBoundsException();
        this.year=year;
        if(month < 1 || month > 12)throw new MonthOutofBoundsException(month);
        this.month=month;
        this.day=day;
    }
}
